import request from '@/axios';
import {baseUrl} from '@/config/env';

export const list = (data) => {
    return loadAll(data);
}
export const loadAll = (data) => {
    return request({
            url: baseUrl + '/start/sysUserManageDept/list',
            method: 'get',
            params: data,
        }
    )
}
export const add = (data) => {
    return request({
            url: baseUrl + '/start/sysUserManageDept/add',
            method: 'post',
            data: data
        }
    )
}

export const updateById = (data) => {
    return request({
            url: baseUrl + '/start/sysUserManageDept/updateById',
            method: 'put',
            data: data
        }
    )
}

export const deleteById = (id) => {
    return request({
            url: baseUrl + '/start/sysUserManageDept/deleteById/' + id,
            method: 'delete',
        }
    )
}

const sysUserManageDeptApi = {
    list,
    loadAll,
    add,
    updateById,
    deleteById,

}

export default sysUserManageDeptApi
